import type { tagsModel} from '@/api/model/tagsModel';
import { request } from '@/utils/request';

const Api = {
  List: '/tags/list',
  Edit:'/tags/edit',
  Delete:'/tags/delete',
  Detail:'/tags/detail'
};

export function getTags(id:string) {
  return request.get<tagsModel>({
    url: Api.Detail+`/${id}`,
  });
}

export function getTagsList(d:any) {
  return request.get<tagsModel>({
    url: Api.List+`?page=${d.current}&pageSize=${d.pageSize}`,
  });
}

export function saveTags(d:any)
{
  return request.post({
    url:Api.Edit,
    data:d
  })
}


export function deleteTags(id:any)
{
  return request.post({
    url:Api.Delete+'?tagid='+id,
    data:{}
  })
}


